package com.qf.dao;

import com.qf.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author sunyamei
 * @version V1.0
 * @Project javase2203
 * @Package com.qf.dao
 * @Description:
 * @Date 2022/8/8 19:16
 */
public interface UserDao {

    @Select("select * from t_users")
    public List<User> findAll();


    @Select("SELECT * from t_users where id=#{id}")
    public  User findById(Integer id);

//    @Select("INSERT INTO  t_users " +
//            "VALUES (name,password,sex,birthday,registTime)")
//    public void add(User user);

    @Select("insert into t_users(name,password,sex,birthday,registTime) values (#{name},#{password},#{sex},#{birthday},#{registTime}) ")
    public void add(User user);

}
